//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS MigrationHubStrategy service.
///
/// Migration Hub Strategy Recommendations This API reference provides descriptions, syntax, and other details about each of the actions and data types for Migration Hub Strategy Recommendations (Strategy Recommendations). The topic for each action shows the API request parameters and the response. Alternatively, you can use one of the AWS SDKs to access an API that is tailored to the programming language or platform that you're using. For more information, see AWS SDKs.
public struct MigrationHubStrategy: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the MigrationHubStrategy client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "MigrationHubStrategy",
            serviceIdentifier: "migrationhub-strategy",
            serviceProtocol: .restjson,
            apiVersion: "2020-02-19",
            endpoint: endpoint,
            errorType: MigrationHubStrategyErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    ///  Retrieves details about an application component.
    @Sendable
    @inlinable
    public func getApplicationComponentDetails(_ input: GetApplicationComponentDetailsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetApplicationComponentDetailsResponse {
        try await self.client.execute(
            operation: "GetApplicationComponentDetails", 
            path: "/get-applicationcomponent-details/{applicationComponentId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves details about an application component.
    ///
    /// Parameters:
    ///   - applicationComponentId:  The ID of the application component. The ID is unique within an AWS account.
    ///   - logger: Logger use during operation
    @inlinable
    public func getApplicationComponentDetails(
        applicationComponentId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetApplicationComponentDetailsResponse {
        let input = GetApplicationComponentDetailsRequest(
            applicationComponentId: applicationComponentId
        )
        return try await self.getApplicationComponentDetails(input, logger: logger)
    }

    ///  Retrieves a list of all the recommended strategies and tools for an application component running on a server.
    @Sendable
    @inlinable
    public func getApplicationComponentStrategies(_ input: GetApplicationComponentStrategiesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetApplicationComponentStrategiesResponse {
        try await self.client.execute(
            operation: "GetApplicationComponentStrategies", 
            path: "/get-applicationcomponent-strategies/{applicationComponentId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves a list of all the recommended strategies and tools for an application component running on a server.
    ///
    /// Parameters:
    ///   - applicationComponentId:  The ID of the application component. The ID is unique within an AWS account.
    ///   - logger: Logger use during operation
    @inlinable
    public func getApplicationComponentStrategies(
        applicationComponentId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetApplicationComponentStrategiesResponse {
        let input = GetApplicationComponentStrategiesRequest(
            applicationComponentId: applicationComponentId
        )
        return try await self.getApplicationComponentStrategies(input, logger: logger)
    }

    ///  Retrieves the status of an on-going assessment.
    @Sendable
    @inlinable
    public func getAssessment(_ input: GetAssessmentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetAssessmentResponse {
        try await self.client.execute(
            operation: "GetAssessment", 
            path: "/get-assessment/{id}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves the status of an on-going assessment.
    ///
    /// Parameters:
    ///   - id:  The assessmentid returned by StartAssessment.
    ///   - logger: Logger use during operation
    @inlinable
    public func getAssessment(
        id: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetAssessmentResponse {
        let input = GetAssessmentRequest(
            id: id
        )
        return try await self.getAssessment(input, logger: logger)
    }

    ///  Retrieves the details about a specific import task.
    @Sendable
    @inlinable
    public func getImportFileTask(_ input: GetImportFileTaskRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetImportFileTaskResponse {
        try await self.client.execute(
            operation: "GetImportFileTask", 
            path: "/get-import-file-task/{id}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves the details about a specific import task.
    ///
    /// Parameters:
    ///   - id:  The ID of the import file task. This ID is returned in the response of StartImportFileTask.
    ///   - logger: Logger use during operation
    @inlinable
    public func getImportFileTask(
        id: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetImportFileTaskResponse {
        let input = GetImportFileTaskRequest(
            id: id
        )
        return try await self.getImportFileTask(input, logger: logger)
    }

    /// Retrieve the latest ID of a specific assessment task.
    @Sendable
    @inlinable
    public func getLatestAssessmentId(_ input: GetLatestAssessmentIdRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetLatestAssessmentIdResponse {
        try await self.client.execute(
            operation: "GetLatestAssessmentId", 
            path: "/get-latest-assessment-id", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieve the latest ID of a specific assessment task.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func getLatestAssessmentId(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetLatestAssessmentIdResponse {
        let input = GetLatestAssessmentIdRequest(
        )
        return try await self.getLatestAssessmentId(input, logger: logger)
    }

    ///  Retrieves your migration and modernization preferences.
    @Sendable
    @inlinable
    public func getPortfolioPreferences(_ input: GetPortfolioPreferencesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetPortfolioPreferencesResponse {
        try await self.client.execute(
            operation: "GetPortfolioPreferences", 
            path: "/get-portfolio-preferences", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves your migration and modernization preferences.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func getPortfolioPreferences(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetPortfolioPreferencesResponse {
        let input = GetPortfolioPreferencesRequest(
        )
        return try await self.getPortfolioPreferences(input, logger: logger)
    }

    ///  Retrieves overall summary including the number of servers to rehost and the overall number of anti-patterns.
    @Sendable
    @inlinable
    public func getPortfolioSummary(_ input: GetPortfolioSummaryRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetPortfolioSummaryResponse {
        try await self.client.execute(
            operation: "GetPortfolioSummary", 
            path: "/get-portfolio-summary", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves overall summary including the number of servers to rehost and the overall number of anti-patterns.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func getPortfolioSummary(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetPortfolioSummaryResponse {
        let input = GetPortfolioSummaryRequest(
        )
        return try await self.getPortfolioSummary(input, logger: logger)
    }

    ///  Retrieves detailed information about the specified recommendation report.
    @Sendable
    @inlinable
    public func getRecommendationReportDetails(_ input: GetRecommendationReportDetailsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetRecommendationReportDetailsResponse {
        try await self.client.execute(
            operation: "GetRecommendationReportDetails", 
            path: "/get-recommendation-report-details/{id}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves detailed information about the specified recommendation report.
    ///
    /// Parameters:
    ///   - id:  The recommendation report generation task id returned by StartRecommendationReportGeneration.
    ///   - logger: Logger use during operation
    @inlinable
    public func getRecommendationReportDetails(
        id: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetRecommendationReportDetailsResponse {
        let input = GetRecommendationReportDetailsRequest(
            id: id
        )
        return try await self.getRecommendationReportDetails(input, logger: logger)
    }

    ///  Retrieves detailed information about a specified server.
    @Sendable
    @inlinable
    public func getServerDetails(_ input: GetServerDetailsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetServerDetailsResponse {
        try await self.client.execute(
            operation: "GetServerDetails", 
            path: "/get-server-details/{serverId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves detailed information about a specified server.
    ///
    /// Parameters:
    ///   - maxResults:  The maximum number of items to include in the response. The maximum value is 100.
    ///   - nextToken:  The token from a previous call that you use to retrieve the next set of results. For example,
    ///   - serverId:  The ID of the server.
    ///   - logger: Logger use during operation
    @inlinable
    public func getServerDetails(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        serverId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetServerDetailsResponse {
        let input = GetServerDetailsRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            serverId: serverId
        )
        return try await self.getServerDetails(input, logger: logger)
    }

    ///  Retrieves recommended strategies and tools for the specified server.
    @Sendable
    @inlinable
    public func getServerStrategies(_ input: GetServerStrategiesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetServerStrategiesResponse {
        try await self.client.execute(
            operation: "GetServerStrategies", 
            path: "/get-server-strategies/{serverId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves recommended strategies and tools for the specified server.
    ///
    /// Parameters:
    ///   - serverId:  The ID of the server.
    ///   - logger: Logger use during operation
    @inlinable
    public func getServerStrategies(
        serverId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetServerStrategiesResponse {
        let input = GetServerStrategiesRequest(
            serverId: serverId
        )
        return try await self.getServerStrategies(input, logger: logger)
    }

    /// Retrieves a list of all the servers fetched from customer vCenter using Strategy Recommendation Collector.
    @Sendable
    @inlinable
    public func listAnalyzableServers(_ input: ListAnalyzableServersRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListAnalyzableServersResponse {
        try await self.client.execute(
            operation: "ListAnalyzableServers", 
            path: "/list-analyzable-servers", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a list of all the servers fetched from customer vCenter using Strategy Recommendation Collector.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of items to include in the response. The maximum value is 100.
    ///   - nextToken: The token from a previous call that you use to retrieve the next set of results. For example, if a previous call to this action returned 100 items, but you set maxResults to 10. You'll receive a set of 10 results along with a token. You then use the returned token to retrieve the next set of 10.
    ///   - sort: Specifies whether to sort by ascending (ASC) or descending (DESC) order.
    ///   - logger: Logger use during operation
    @inlinable
    public func listAnalyzableServers(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        sort: SortOrder? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListAnalyzableServersResponse {
        let input = ListAnalyzableServersRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            sort: sort
        )
        return try await self.listAnalyzableServers(input, logger: logger)
    }

    ///  Retrieves a list of all the application components (processes).
    @Sendable
    @inlinable
    public func listApplicationComponents(_ input: ListApplicationComponentsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListApplicationComponentsResponse {
        try await self.client.execute(
            operation: "ListApplicationComponents", 
            path: "/list-applicationcomponents", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves a list of all the application components (processes).
    ///
    /// Parameters:
    ///   - applicationComponentCriteria:  Criteria for filtering the list of application components.
    ///   - filterValue:  Specify the value based on the application component criteria type. For example, if applicationComponentCriteria is set to SERVER_ID and filterValue is set to server1, then ListApplicationComponents returns all the application components running on server1.
    ///   - groupIdFilter:  The group ID specified in to filter on.
    ///   - maxResults:  The maximum number of items to include in the response. The maximum value is 100.
    ///   - nextToken:  The token from a previous call that you use to retrieve the next set of results. For example,
    ///   - sort:  Specifies whether to sort by ascending (ASC) or descending (DESC) order.
    ///   - logger: Logger use during operation
    @inlinable
    public func listApplicationComponents(
        applicationComponentCriteria: ApplicationComponentCriteria? = nil,
        filterValue: String? = nil,
        groupIdFilter: [Group]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        sort: SortOrder? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListApplicationComponentsResponse {
        let input = ListApplicationComponentsRequest(
            applicationComponentCriteria: applicationComponentCriteria, 
            filterValue: filterValue, 
            groupIdFilter: groupIdFilter, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            sort: sort
        )
        return try await self.listApplicationComponents(input, logger: logger)
    }

    ///  Retrieves a list of all the installed collectors.
    @Sendable
    @inlinable
    public func listCollectors(_ input: ListCollectorsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListCollectorsResponse {
        try await self.client.execute(
            operation: "ListCollectors", 
            path: "/list-collectors", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves a list of all the installed collectors.
    ///
    /// Parameters:
    ///   - maxResults:  The maximum number of items to include in the response. The maximum value is 100.
    ///   - nextToken:  The token from a previous call that you use to retrieve the next set of results. For example,
    ///   - logger: Logger use during operation
    @inlinable
    public func listCollectors(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListCollectorsResponse {
        let input = ListCollectorsRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listCollectors(input, logger: logger)
    }

    ///  Retrieves a list of all the imports performed.
    @Sendable
    @inlinable
    public func listImportFileTask(_ input: ListImportFileTaskRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListImportFileTaskResponse {
        try await self.client.execute(
            operation: "ListImportFileTask", 
            path: "/list-import-file-task", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Retrieves a list of all the imports performed.
    ///
    /// Parameters:
    ///   - maxResults:  The total number of items to return. The maximum value is 100.
    ///   - nextToken:  The token from a previous call that you use to retrieve the next set of results. For example,
    ///   - logger: Logger use during operation
    @inlinable
    public func listImportFileTask(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListImportFileTaskResponse {
        let input = ListImportFileTaskRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listImportFileTask(input, logger: logger)
    }

    ///  Returns a list of all the servers.
    @Sendable
    @inlinable
    public func listServers(_ input: ListServersRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListServersResponse {
        try await self.client.execute(
            operation: "ListServers", 
            path: "/list-servers", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Returns a list of all the servers.
    ///
    /// Parameters:
    ///   - filterValue:  Specifies the filter value, which is based on the type of server criteria. For example, if serverCriteria is OS_NAME, and the filterValue is equal to WindowsServer, then ListServers returns all of the servers matching the OS name WindowsServer.
    ///   - groupIdFilter:  Specifies the group ID to filter on.
    ///   - maxResults:  The maximum number of items to include in the response. The maximum value is 100.
    ///   - nextToken:  The token from a previous call that you use to retrieve the next set of results. For example,
    ///   - serverCriteria:  Criteria for filtering servers.
    ///   - sort:  Specifies whether to sort by ascending (ASC) or descending (DESC) order.
    ///   - logger: Logger use during operation
    @inlinable
    public func listServers(
        filterValue: String? = nil,
        groupIdFilter: [Group]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        serverCriteria: ServerCriteria? = nil,
        sort: SortOrder? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListServersResponse {
        let input = ListServersRequest(
            filterValue: filterValue, 
            groupIdFilter: groupIdFilter, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            serverCriteria: serverCriteria, 
            sort: sort
        )
        return try await self.listServers(input, logger: logger)
    }

    ///  Saves the specified migration and modernization preferences.
    @Sendable
    @inlinable
    public func putPortfolioPreferences(_ input: PutPortfolioPreferencesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutPortfolioPreferencesResponse {
        try await self.client.execute(
            operation: "PutPortfolioPreferences", 
            path: "/put-portfolio-preferences", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Saves the specified migration and modernization preferences.
    ///
    /// Parameters:
    ///   - applicationMode: The classification for application component types.
    ///   - applicationPreferences:  The transformation preferences for non-database applications.
    ///   - databasePreferences:  The transformation preferences for database applications.
    ///   - prioritizeBusinessGoals:  The rank of the business goals based on priority.
    ///   - logger: Logger use during operation
    @inlinable
    public func putPortfolioPreferences(
        applicationMode: ApplicationMode? = nil,
        applicationPreferences: ApplicationPreferences? = nil,
        databasePreferences: DatabasePreferences? = nil,
        prioritizeBusinessGoals: PrioritizeBusinessGoals? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutPortfolioPreferencesResponse {
        let input = PutPortfolioPreferencesRequest(
            applicationMode: applicationMode, 
            applicationPreferences: applicationPreferences, 
            databasePreferences: databasePreferences, 
            prioritizeBusinessGoals: prioritizeBusinessGoals
        )
        return try await self.putPortfolioPreferences(input, logger: logger)
    }

    ///  Starts the assessment of an on-premises environment.
    @Sendable
    @inlinable
    public func startAssessment(_ input: StartAssessmentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartAssessmentResponse {
        try await self.client.execute(
            operation: "StartAssessment", 
            path: "/start-assessment", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Starts the assessment of an on-premises environment.
    ///
    /// Parameters:
    ///   - assessmentDataSourceType: The data source type of an assessment to be started.
    ///   - assessmentTargets: List of criteria for assessment.
    ///   - s3bucketForAnalysisData:  The S3 bucket used by the collectors to send analysis data to the service. The bucket name must begin with migrationhub-strategy-.
    ///   - s3bucketForReportData:  The S3 bucket where all the reports generated by the service are stored. The bucket name must begin with migrationhub-strategy-.
    ///   - logger: Logger use during operation
    @inlinable
    public func startAssessment(
        assessmentDataSourceType: AssessmentDataSourceType? = nil,
        assessmentTargets: [AssessmentTarget]? = nil,
        s3bucketForAnalysisData: String? = nil,
        s3bucketForReportData: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartAssessmentResponse {
        let input = StartAssessmentRequest(
            assessmentDataSourceType: assessmentDataSourceType, 
            assessmentTargets: assessmentTargets, 
            s3bucketForAnalysisData: s3bucketForAnalysisData, 
            s3bucketForReportData: s3bucketForReportData
        )
        return try await self.startAssessment(input, logger: logger)
    }

    ///  Starts a file import.
    @Sendable
    @inlinable
    public func startImportFileTask(_ input: StartImportFileTaskRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartImportFileTaskResponse {
        try await self.client.execute(
            operation: "StartImportFileTask", 
            path: "/start-import-file-task", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Starts a file import.
    ///
    /// Parameters:
    ///   - dataSourceType: Specifies the source that the servers are coming from. By default, Strategy Recommendations assumes that the servers specified in the import file are available in AWS Application Discovery Service.
    ///   - groupId: Groups the resources in the import file together with a unique name. This ID can be as filter in ListApplicationComponents and ListServers.
    ///   - name:  A descriptive name for the request.
    ///   - s3Bucket:  The S3 bucket where the import file is located. The bucket name is required to begin with migrationhub-strategy-.
    ///   - s3bucketForReportData:  The S3 bucket where Strategy Recommendations uploads import results. The bucket name is required to begin with migrationhub-strategy-.
    ///   - s3key:  The Amazon S3 key name of the import file.
    ///   - logger: Logger use during operation
    @inlinable
    public func startImportFileTask(
        dataSourceType: DataSourceType? = nil,
        groupId: [Group]? = nil,
        name: String,
        s3Bucket: String,
        s3bucketForReportData: String? = nil,
        s3key: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartImportFileTaskResponse {
        let input = StartImportFileTaskRequest(
            dataSourceType: dataSourceType, 
            groupId: groupId, 
            name: name, 
            s3Bucket: s3Bucket, 
            s3bucketForReportData: s3bucketForReportData, 
            s3key: s3key
        )
        return try await self.startImportFileTask(input, logger: logger)
    }

    ///  Starts generating a recommendation report.
    @Sendable
    @inlinable
    public func startRecommendationReportGeneration(_ input: StartRecommendationReportGenerationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartRecommendationReportGenerationResponse {
        try await self.client.execute(
            operation: "StartRecommendationReportGeneration", 
            path: "/start-recommendation-report-generation", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Starts generating a recommendation report.
    ///
    /// Parameters:
    ///   - groupIdFilter:  Groups the resources in the recommendation report with a unique name.
    ///   - outputFormat:  The output format for the recommendation report file. The default format is Microsoft Excel.
    ///   - logger: Logger use during operation
    @inlinable
    public func startRecommendationReportGeneration(
        groupIdFilter: [Group]? = nil,
        outputFormat: OutputFormat? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartRecommendationReportGenerationResponse {
        let input = StartRecommendationReportGenerationRequest(
            groupIdFilter: groupIdFilter, 
            outputFormat: outputFormat
        )
        return try await self.startRecommendationReportGeneration(input, logger: logger)
    }

    ///  Stops the assessment of an on-premises environment.
    @Sendable
    @inlinable
    public func stopAssessment(_ input: StopAssessmentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StopAssessmentResponse {
        try await self.client.execute(
            operation: "StopAssessment", 
            path: "/stop-assessment", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Stops the assessment of an on-premises environment.
    ///
    /// Parameters:
    ///   - assessmentId:  The assessmentId returned by StartAssessment.
    ///   - logger: Logger use during operation
    @inlinable
    public func stopAssessment(
        assessmentId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StopAssessmentResponse {
        let input = StopAssessmentRequest(
            assessmentId: assessmentId
        )
        return try await self.stopAssessment(input, logger: logger)
    }

    ///  Updates the configuration of an application component.
    @Sendable
    @inlinable
    public func updateApplicationComponentConfig(_ input: UpdateApplicationComponentConfigRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateApplicationComponentConfigResponse {
        try await self.client.execute(
            operation: "UpdateApplicationComponentConfig", 
            path: "/update-applicationcomponent-config/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Updates the configuration of an application component.
    ///
    /// Parameters:
    ///   - applicationComponentId:  The ID of the application component. The ID is unique within an AWS account.
    ///   - appType: The type of known component.
    ///   - configureOnly: Update the configuration request of an application component. If it is set to true, the source code and/or database credentials are updated. If it is set to false, the source code and/or database credentials are updated and an analysis is initiated.
    ///   - inclusionStatus:  Indicates whether the application component has been included for server recommendation or not.
    ///   - secretsManagerKey:  Database credentials.
    ///   - sourceCodeList:  The list of source code configurations to update for the application component.
    ///   - strategyOption:  The preferred strategy options for the application component. Use values from the GetApplicationComponentStrategies response.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateApplicationComponentConfig(
        applicationComponentId: String,
        appType: AppType? = nil,
        configureOnly: Bool? = nil,
        inclusionStatus: InclusionStatus? = nil,
        secretsManagerKey: String? = nil,
        sourceCodeList: [SourceCode]? = nil,
        strategyOption: StrategyOption? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateApplicationComponentConfigResponse {
        let input = UpdateApplicationComponentConfigRequest(
            applicationComponentId: applicationComponentId, 
            appType: appType, 
            configureOnly: configureOnly, 
            inclusionStatus: inclusionStatus, 
            secretsManagerKey: secretsManagerKey, 
            sourceCodeList: sourceCodeList, 
            strategyOption: strategyOption
        )
        return try await self.updateApplicationComponentConfig(input, logger: logger)
    }

    ///  Updates the configuration of the specified server.
    @Sendable
    @inlinable
    public func updateServerConfig(_ input: UpdateServerConfigRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateServerConfigResponse {
        try await self.client.execute(
            operation: "UpdateServerConfig", 
            path: "/update-server-config/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Updates the configuration of the specified server.
    ///
    /// Parameters:
    ///   - serverId:  The ID of the server.
    ///   - strategyOption:  The preferred strategy options for the application component. See the response from GetServerStrategies.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateServerConfig(
        serverId: String,
        strategyOption: StrategyOption? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateServerConfigResponse {
        let input = UpdateServerConfigRequest(
            serverId: serverId, 
            strategyOption: strategyOption
        )
        return try await self.updateServerConfig(input, logger: logger)
    }
}

extension MigrationHubStrategy {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: MigrationHubStrategy, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension MigrationHubStrategy {
    /// Return PaginatorSequence for operation ``getServerDetails(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getServerDetailsPaginator(
        _ input: GetServerDetailsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetServerDetailsRequest, GetServerDetailsResponse> {
        return .init(
            input: input,
            command: self.getServerDetails,
            inputKey: \GetServerDetailsRequest.nextToken,
            outputKey: \GetServerDetailsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getServerDetails(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults:  The maximum number of items to include in the response. The maximum value is 100.
    ///   - serverId:  The ID of the server.
    ///   - logger: Logger used for logging
    @inlinable
    public func getServerDetailsPaginator(
        maxResults: Int? = nil,
        serverId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetServerDetailsRequest, GetServerDetailsResponse> {
        let input = GetServerDetailsRequest(
            maxResults: maxResults, 
            serverId: serverId
        )
        return self.getServerDetailsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listAnalyzableServers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listAnalyzableServersPaginator(
        _ input: ListAnalyzableServersRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListAnalyzableServersRequest, ListAnalyzableServersResponse> {
        return .init(
            input: input,
            command: self.listAnalyzableServers,
            inputKey: \ListAnalyzableServersRequest.nextToken,
            outputKey: \ListAnalyzableServersResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listAnalyzableServers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of items to include in the response. The maximum value is 100.
    ///   - sort: Specifies whether to sort by ascending (ASC) or descending (DESC) order.
    ///   - logger: Logger used for logging
    @inlinable
    public func listAnalyzableServersPaginator(
        maxResults: Int? = nil,
        sort: SortOrder? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListAnalyzableServersRequest, ListAnalyzableServersResponse> {
        let input = ListAnalyzableServersRequest(
            maxResults: maxResults, 
            sort: sort
        )
        return self.listAnalyzableServersPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listApplicationComponents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listApplicationComponentsPaginator(
        _ input: ListApplicationComponentsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListApplicationComponentsRequest, ListApplicationComponentsResponse> {
        return .init(
            input: input,
            command: self.listApplicationComponents,
            inputKey: \ListApplicationComponentsRequest.nextToken,
            outputKey: \ListApplicationComponentsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listApplicationComponents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - applicationComponentCriteria:  Criteria for filtering the list of application components.
    ///   - filterValue:  Specify the value based on the application component criteria type. For example, if applicationComponentCriteria is set to SERVER_ID and filterValue is set to server1, then ListApplicationComponents returns all the application components running on server1.
    ///   - groupIdFilter:  The group ID specified in to filter on.
    ///   - maxResults:  The maximum number of items to include in the response. The maximum value is 100.
    ///   - sort:  Specifies whether to sort by ascending (ASC) or descending (DESC) order.
    ///   - logger: Logger used for logging
    @inlinable
    public func listApplicationComponentsPaginator(
        applicationComponentCriteria: ApplicationComponentCriteria? = nil,
        filterValue: String? = nil,
        groupIdFilter: [Group]? = nil,
        maxResults: Int? = nil,
        sort: SortOrder? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListApplicationComponentsRequest, ListApplicationComponentsResponse> {
        let input = ListApplicationComponentsRequest(
            applicationComponentCriteria: applicationComponentCriteria, 
            filterValue: filterValue, 
            groupIdFilter: groupIdFilter, 
            maxResults: maxResults, 
            sort: sort
        )
        return self.listApplicationComponentsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listCollectors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listCollectorsPaginator(
        _ input: ListCollectorsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListCollectorsRequest, ListCollectorsResponse> {
        return .init(
            input: input,
            command: self.listCollectors,
            inputKey: \ListCollectorsRequest.nextToken,
            outputKey: \ListCollectorsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listCollectors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults:  The maximum number of items to include in the response. The maximum value is 100.
    ///   - logger: Logger used for logging
    @inlinable
    public func listCollectorsPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListCollectorsRequest, ListCollectorsResponse> {
        let input = ListCollectorsRequest(
            maxResults: maxResults
        )
        return self.listCollectorsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listImportFileTask(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listImportFileTaskPaginator(
        _ input: ListImportFileTaskRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListImportFileTaskRequest, ListImportFileTaskResponse> {
        return .init(
            input: input,
            command: self.listImportFileTask,
            inputKey: \ListImportFileTaskRequest.nextToken,
            outputKey: \ListImportFileTaskResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listImportFileTask(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults:  The total number of items to return. The maximum value is 100.
    ///   - logger: Logger used for logging
    @inlinable
    public func listImportFileTaskPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListImportFileTaskRequest, ListImportFileTaskResponse> {
        let input = ListImportFileTaskRequest(
            maxResults: maxResults
        )
        return self.listImportFileTaskPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listServers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listServersPaginator(
        _ input: ListServersRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListServersRequest, ListServersResponse> {
        return .init(
            input: input,
            command: self.listServers,
            inputKey: \ListServersRequest.nextToken,
            outputKey: \ListServersResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listServers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filterValue:  Specifies the filter value, which is based on the type of server criteria. For example, if serverCriteria is OS_NAME, and the filterValue is equal to WindowsServer, then ListServers returns all of the servers matching the OS name WindowsServer.
    ///   - groupIdFilter:  Specifies the group ID to filter on.
    ///   - maxResults:  The maximum number of items to include in the response. The maximum value is 100.
    ///   - serverCriteria:  Criteria for filtering servers.
    ///   - sort:  Specifies whether to sort by ascending (ASC) or descending (DESC) order.
    ///   - logger: Logger used for logging
    @inlinable
    public func listServersPaginator(
        filterValue: String? = nil,
        groupIdFilter: [Group]? = nil,
        maxResults: Int? = nil,
        serverCriteria: ServerCriteria? = nil,
        sort: SortOrder? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListServersRequest, ListServersResponse> {
        let input = ListServersRequest(
            filterValue: filterValue, 
            groupIdFilter: groupIdFilter, 
            maxResults: maxResults, 
            serverCriteria: serverCriteria, 
            sort: sort
        )
        return self.listServersPaginator(input, logger: logger)
    }
}

extension MigrationHubStrategy.GetServerDetailsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> MigrationHubStrategy.GetServerDetailsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            serverId: self.serverId
        )
    }
}

extension MigrationHubStrategy.ListAnalyzableServersRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> MigrationHubStrategy.ListAnalyzableServersRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            sort: self.sort
        )
    }
}

extension MigrationHubStrategy.ListApplicationComponentsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> MigrationHubStrategy.ListApplicationComponentsRequest {
        return .init(
            applicationComponentCriteria: self.applicationComponentCriteria,
            filterValue: self.filterValue,
            groupIdFilter: self.groupIdFilter,
            maxResults: self.maxResults,
            nextToken: token,
            sort: self.sort
        )
    }
}

extension MigrationHubStrategy.ListCollectorsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> MigrationHubStrategy.ListCollectorsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension MigrationHubStrategy.ListImportFileTaskRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> MigrationHubStrategy.ListImportFileTaskRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension MigrationHubStrategy.ListServersRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> MigrationHubStrategy.ListServersRequest {
        return .init(
            filterValue: self.filterValue,
            groupIdFilter: self.groupIdFilter,
            maxResults: self.maxResults,
            nextToken: token,
            serverCriteria: self.serverCriteria,
            sort: self.sort
        )
    }
}
